from distutils.core import setup
import py2exe

import os

# The main entry point of the program
script_file = 'run_game.py'

# Create a list of data files.  Add everything in the 'res/' directory.
data_files = []
for file in os.listdir('data'):
    file = os.path.join('data', file)
    if os.path.isfile(file):
        data_files.append(file)

for file in os.listdir('lib'):
    file = os.path.join('lib', file)
    if os.path.isfile(file):
        data_files.append(file)

# Setup args that apply to all setups, including ordinary distutils.
setup_args = dict(
    data_files=[('data', data_files)]
)

# py2exe options
try:
    import py2exe
    setup_args.update(dict(
        windows=[dict(
            script=script_file,
            includes
            #icon_resources=[(1, 'assets/app.ico')],
        )],
    ))
except ImportError:
    pass

#isetup(windows=['run_game.py'])
setup(**setup_args)
